package com.albb.scotk;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.concurrent.TimeUnit;

@SpringBootApplication
public class ScotkAppliction {

    public static void main(String arg[]) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(ScotkAppliction.class, arg);

        while (true) {
            String username = applicationContext.getEnvironment().getProperty("username");
            String password = applicationContext.getEnvironment().getProperty("password");
            String testconfig = applicationContext.getEnvironment().getProperty("testvvconfig");
            System.out.println("username:" + username + ",password:" + password + ",testconfig:" + testconfig);
            try {
                TimeUnit.SECONDS.sleep(2);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }


}
